﻿using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Visual
{
    [XmlRoot("path", Namespace = Constants.Main)]
    public class PathGradient : XmlSerializable, IShadeProperty
    {
        [Optional]
        [XmlAttribute("path", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_PathShadeType> Type { get; set; }

        [Optional]
        [XmlElement("fillToRect", Namespace = Constants.Main)]
        public FillToRect FillToRect { get; set; }

        public PathGradient() { }
    }

    [XmlRoot("fillToRect", Namespace = Constants.Main)]
    public class FillToRect : XmlSerializable
    {
        [Optional]
        [XmlAttribute("l", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> Left { get; set; }

        [Optional]
        [XmlAttribute("t", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> Top { get; set; }

        [Optional]
        [XmlAttribute("r", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> Right { get; set; }

        [Optional]
        [XmlAttribute("b", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> Bottom { get; set; }

        public FillToRect() { }
    }
}
